import request from "@/utils/request";
const Base = process.env.VUE_APP_BASE_API;
import qs from "qs";
// 获取全部任务列表
export function getTaskPageList(query) {
  return request({
    url: `${Base}/auditFeign/userTask/getTaskPageList`,
    method: "get",
    params: query,
    timeout: 35000
  });
}
// 完成用户任务-同意
export function completeTask(data) {
  return request({
    url: `${Base}/auditFeign/completeTask`,
    method: "post",
    headers: {
      "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
    },
    data: qs.stringify(data),
  });
}
// 审批用户任务-驳回指定节点
export function callBackTask(data) {
  return request({
    url: `${Base}/auditFeign/callBackTask`,
    method: "post",
    headers: {
      "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
    },
    data: qs.stringify(data),
  });
}
// 获取流程节点
export function getFlowNodes(query) {
  return request({
    url: `${Base}/auditFeign/getFlowNodes`,
    method: "post",
    method: "get",
    params: query,
  });
}

// 获取处理记录
export function getInstanceHandleList(query) {
  return request({
    url: `${Base}/auditFeign/getInstanceHandleList`,
    method: "post",
    method: "get",
    params: query,
  });
}

